WXP Build Guide#
![]()
noexit4237wjhu6v.onion - gitea server
yotsuba7pverpfs5.onion - nt5src.7z/toolset.zip/NTDEV videos
Matrix Chat - https://matrix.to/#/!gaxpoQqVZuAKwRucaK:privacytools.io
Best:#
magnet:?xt=urn:btih:1a4e5b67060ff2bc8fe2de36a6c265c77f392a0c&dn=NOTREPACKED
REPACKED (about 40GB of useless shit):#
magnet:?xt=urn:btih:cec41d87d329822ea9b05c4f6c0dff7d29514d59&dn=Microsoft%20leaked%20source%20code%20archive%5F2020-09-20
Direct DL:#
http://yotsuba7pverpfs5.onion/files/nt5src.7z
Contents#
Windows Server 2003 (NT 5.2 / 3790) guide#
Preparing Environment#
- Extract source tree, in this guide we will assume
C:\NT(if you wish for your binaries to match RTM as closely as possible, useD:\srv03rtm) - Unset Read Only on extracted directory (including subfolders and files)
- Create desktop shortcut for
%windir%\system32\cmd.exe /k C:\NT\tools\razzle.cmd free offline(see below for explanation) and changeStart intoC:\NT(do not open it yet!) - Acquire new certificates and overwrite old files with newly extracted ones (archive also contains private keys in
.derformat if you wish to renew them at any point) - Manually import
\tools\driver.pfxcertificate and private key (if asked for password, simply press Next without typing anything) - Apply patches (available below) to NT tree
- Copy these files/directories from XP source tree and copy them into 2K3 tree:
\public\internal\windows\lib\i386\directui.lib\public\internal\windows\lib\i386\conlibk.lib
- Acquire these files/directories and copy them into source tree:
\base\ntos\ex\exinit.c\base\ntos\ex\systime.c\base\ntos\ex\exp.h\tools\missing.cmd\tools\oscdimg.cmd
- Copy these files/directories and store them safely outside source tree:
\ds\security\services\ca\tools\certut\obj\\inetcore\outlookexpress\external\obj{pd}\
- Now you can open new razzle window by using your shortcut
Building#
You are now ready to attempt first build. First, decide on how you would like to proceed.
Clean build#
perl tools\timebuild.pl -NOPOSTBUILD -NOSCORCH- Copy back the files you've stored outside of source tree in preparation step
- Run
build /ZPagain and ensurebuild.erris empty
"Dirty" build#
nmake set_builddate set_buildnum set_buildname -f makefil0perl tools\timebuild.pl -NOCLEANBUILD -NOPOSTBUILD -NOSCORCH- Run
build /ZPagain and ensurebuild.erris empty
Rest of instructions are the same for both types:
- Mount RTM CD and execute
tools\missing.cmd(optionally, perform this step for every SKU) - Edit
\tools\postbuildscripts\pbuild.datand comment out (;) thesxs_make_asms_cabslines tools\postbuild.cmd(use-sku:{sku}if you want to process only specific one, expect errors if you ignore this and have skipped onmissing.cmdoptional step)
Getting ISO files#
- Execute
tools\oscdimg.cmd {sku}where{sku}is one of:srv- Windows Server 2003 Standard Editionsbs- Windows Server 2003 Small Business Editionads- Windows Server 2003 Enterprise Editiondtc- Windows Server 2003 Datacenter Editionbla- Windows Server 2003 Web Editionper- Windows XP Home Editionpro- Windows XP Professional
Patches#
Following patches should be applied before building:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | --- a/ds/win32/ntcrypto/mincrypt/vercert.cpp
+++ b/ds/win32/ntcrypto/mincrypt/vercert.cpp
@@ -234,55 +234,46 @@
// Test Roots
//-=========================================================================
-// Name:: <CN=Microsoft Test Root Authority, OU=Microsoft Corporation, OU=Copyright (c) 1999 Microsoft Corp.>
+// Name:: <CN=Microsoft Test Root Authority, OU=Copyright (c) 1999 Microsoft Corp., OU=Microsoft Corporation>
const BYTE rgbTestRoot0_Name[] = {
- 0x30, 0x75, 0x31, 0x2B, 0x30, 0x29, 0x06, 0x03,
- 0x55, 0x04, 0x0B, 0x13, 0x22, 0x43, 0x6F, 0x70,
- 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x28,
- 0x63, 0x29, 0x20, 0x31, 0x39, 0x39, 0x39, 0x20,
- 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66,
- 0x74, 0x20, 0x43, 0x6F, 0x72, 0x70, 0x2E, 0x31,
- 0x1E, 0x30, 0x1C, 0x06, 0x03, 0x55, 0x04, 0x0B,
- 0x13, 0x15, 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73,
- 0x6F, 0x66, 0x74, 0x20, 0x43, 0x6F, 0x72, 0x70,
- 0x6F, 0x72, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x31,
- 0x26, 0x30, 0x24, 0x06, 0x03, 0x55, 0x04, 0x03,
- 0x13, 0x1D, 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73,
- 0x6F, 0x66, 0x74, 0x20, 0x54, 0x65, 0x73, 0x74,
- 0x20, 0x52, 0x6F, 0x6F, 0x74, 0x20, 0x41, 0x75,
- 0x74, 0x68, 0x6F, 0x72, 0x69, 0x74, 0x79
+ 0x30, 0x75, 0x31, 0x2B, 0x30, 0x29, 0x06, 0x03, 0x55, 0x04,
+ 0x0B, 0x13, 0x22, 0x43, 0x6F, 0x70, 0x79, 0x72, 0x69, 0x67,
+ 0x68, 0x74, 0x20, 0x28, 0x63, 0x29, 0x20, 0x31, 0x39, 0x39,
+ 0x39, 0x20, 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66,
+ 0x74, 0x20, 0x43, 0x6F, 0x72, 0x70, 0x2E, 0x31, 0x26, 0x30,
+ 0x24, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x1D, 0x4D, 0x69,
+ 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74, 0x20, 0x54, 0x65,
+ 0x73, 0x74, 0x20, 0x52, 0x6F, 0x6F, 0x74, 0x20, 0x41, 0x75,
+ 0x74, 0x68, 0x6F, 0x72, 0x69, 0x74, 0x79, 0x31, 0x1E, 0x30,
+ 0x1C, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x13, 0x15, 0x4D, 0x69,
+ 0x63, 0x72, 0x6F, 0x73, 0x6F,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, 0x1B, 0xA8,
+ 0x31, 0xE1, 0x66, 0x5E, 0x7A, 0x07, 0x3C, 0x1E, 0x13, 0xBC,
+ 0xFE, 0x44, 0xCF, 0x22, 0x06, 0xC3, 0xA0, 0x8A, 0xA1, 0x76,
+ 0x46, 0xDB, 0x53, 0xBC, 0x7D, 0xD2, 0xFD, 0x4B, 0xE1, 0x0C,
+ 0x4F, 0x41, 0x33, 0x55, 0xA6, 0xCD, 0xD5, 0x60, 0xCD, 0xCE,
+ 0xA8, 0x5A, 0x00, 0xE7, 0xB7, 0x0A, 0xAE, 0x75, 0xD8, 0x8E,
+ 0xD4, 0x71, 0xCF, 0xE7, 0xEE, 0x4B, 0xC5, 0x89, 0x85, 0x0B,
+ 0x38, 0xB1, 0x4C, 0x6C, 0x4E, 0xBE, 0x63, 0xA6, 0x5D, 0x40,
+ 0x2E, 0x1C, 0xFF, 0x80, 0x9A, 0x10, 0xCE, 0x82, 0x41, 0x79,
+ 0x39, 0xAD, 0xAD, 0xE2, 0x97, 0xE1, 0xAE, 0x1B, 0x20, 0x47,
+ 0x3D, 0x1C, 0xBF, 0xCD, 0x25, 0xB1, 0x73, 0x49, 0x16, 0xEE,
+ 0xCD, 0xBB, 0xC9, 0x8F, 0xEC, 0x57, 0x6E, 0x24, 0xF8, 0xCF,
+ 0xE5, 0x02, 0x03, 0x01, 0x00, 0x01
};
@@ -316,7 +307,7 @@
#define wszSYSTEM_SETUP_REG_VALUE \
L"SystemSetupInProgress"
#define wszTEST_ROOT_REG \
- L"SOFTWARE\\Microsoft\\SystemCertificates\\Root\\Certificates\\2BD63D28D7BCD0E251195AEB519243C13142EBC3"
+ L"SOFTWARE\\Microsoft\\SystemCertificates\\Root\\Certificates\\A4CAECFC40A44BB73E3BBF69477BC68D07B0C7AB"
// Check the CERT_STORE_PROV_SYSTEM_REGISTRY store for the Test Root.
//
|
Additions#
Why build flags are necessary#
Certain parts of code are missing but present in pre-built form, using -NOCLEANBUILD and -NOSCORCH ensures that they are not removed from the tree
Removing timebomb#
Comment out timebomb lines from tools\postbuildscripts\pbuild.dat before running postbuild for the first time (currently there is no guide to revert it)
Different build options#
You can modify your razzle shortcut (or execute command manually inside C:\NT) to include (or remove) additional argument(s):
free- build 'free' bits (production, ommiting it will generated checked bits)CkhKernel- build 'checked' (testing) kernel/hal/ntdll when building 'free' bitsno_opts- disable binary optimization (useful for debugging, but will most likely fail a full build, some code can't be built without optimization)verbose- enable verbose execution of the build processbinaries_dir <basepath>- specifies custom output directory (default isbinaries, the suffix added after.is non-customizable)
Other options are not described here, see razzle.cmd /? for details.
Creating fresh build#
You can use tools\postbuild.cmd -full to create fresh package, however this has not been properly tested yet, expect the unexpected!
Original CD filenames#
5.2.3790.0.srv03_rtm.030324-2048_x86fre_server-standard_retail_en-us-NRMSFPP_EN.iso(SHA1: A600409482A5678EF6AF2B26D3576D6D9894178D)5.2.3790.0.srv03_rtm.030324-2048_x86fre_server-datacenter_retail_en-us-NRMDOEM_EN.iso(SHA1: E2B47A7CE45C6C6305594CEE4C1B64894805AAF4)5.2.3790.0.srv03_rtm.030324-2048_x86fre_server-enterpriseserver_retail_en-us-NRMEFPP_EN.iso(SHA1: 0309FFB4181BA5122C692A6E1079E9FC1D53FCE4)5.2.3790.0.srv03_rtm.030324-2048_x86fre_server-webserver_retail_en-us-NRMWFPP_EN.iso(SHA1: 46C1CCB2CFC96803E304A35BEF50CD71B2C1DE38)5.1.2600.0.xpclient.010817-1148_x86fre_client-home_retail_en-us-WXHFPP_EN.iso(SHA1: B273C8D41E3844E3E46722F52F5A4CF9F206C8D0)5.1.2600.0.xpclient.010817-1148_x86fre_client-professional_retail_en-us-WXPFPP_EN.iso(SHA1: 1400DED4402D50F3864ED3D8DCF5CC52BA79A04A)sbs.iso(coverted from mdf; SHA1: CDB30C80FDE314C16CA11F5CD31650ECBEC7A214)
Product keys#
- Standard Edition: M6RJ9-TBJH3-9DDXM-4VX9Q-K8M8M
64-bit specific#
list of tools that must be recompiled in order to build on x64#
TODO:#
get a functional iso, provide a complete buildguide